import Vue from "vue";
import "mint-ui/lib/style.min.css";
import mint from "mint-ui";
Vue.use(mint);
import vueRouter from "vue-router";
Vue.use(vueRouter);
import app from "./App.vue";
import "../statics/mui/css/mui.css";
import "../statics/css/site.css";


import home from "./components/home.vue";
import shopcar from "./components/shopcar.vue";
import photolist from "./components/photo/photolist.vue";
import newslist from "./components/news/newslist.vue";
import newsinfo from "./components/news/newsinfo.vue";
import goodslist from "./components/goods/goodslist.vue";
import callme from "./components/callme.vue";
import feedback from "./components/feedback.vue";
import video from "./components/video.vue";

import moment from "moment";
Vue.filter('datefmt', function(input, fmtstring) {
    return moment(input).format(fmtstring);
});

import vueResource from "vue-resource";
Vue.use(vueResource);

var router1 = new vueRouter({
    linkActiveClass: 'mui-active',
    routes: [
        { path: '/home', component: home },
        { path: '/shopcar', component: shopcar },
        { path: '/photo/photolist', component: photolist },
        { path: '/video', component: video },
        { path: '/feedback', component: feedback },
        { path: '/callme', component: callme },
        { path: '/goods/goodslist', component: goodslist },
        { path: '/news/newslist', component: newslist },
        { path: '/news/newsinfo/:id', component: newsinfo },

        { path: '/', component: home }
    ]
});
new Vue({
    el: "#app",
    router: router1,
    render: c => c(app)
});